package bean.tasktype;

import dao.tasktype.TaskTypeDAO;
import entity.tasktype.TaskType;

import java.util.List;

import javax.enterprise.context.ConversationScoped;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.inject.Inject;

@ManagedBean
@ViewScoped
public class TaskTypeListBean {
	
	@Inject
	private TaskTypeDAO taskTypeDAO;
	
	private List<TaskType> listTaskTypes;
	
	public List<TaskType> loadAllTaskTypes() {
		 return taskTypeDAO.findByCriteria();
	}

	public List<TaskType> getListTaskTypes() {
		listTaskTypes = taskTypeDAO.findByCriteria();
		return listTaskTypes;
	}

	public void setListTaskTypes(List<TaskType> listTaskTypes) {
		this.listTaskTypes = listTaskTypes;
	}

}